package com.contract.controller;

import com.contract.service.FileService;
import com.contract.service.LoginService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @author liw
 * @version 1.0
 * @date 2024/2/16 23:06
 */
@ApiOperation("test")
@RestController
@RequestMapping("contract/test")
public class TestController {

    @Autowired
    private FileService fileService;

    @GetMapping("download")
    @ApiOperation("下载")
    public void download(@RequestParam("id") Long id) {
        fileService.download(id);
    }

    @GetMapping("test")
    @ApiOperation("下载")
    public String  test() {
      return "OK";
    }
}
